#lang racket

(require "util/utils.scm")
(provide definition-names)
;; inputs:
;;   the output language of pass-tag
;;   a list of definitions
;;
;; outputs:
;;   a list of all the names defined

(define (definition-names source) (concatenate (map* definition-names-toplevel source)))

(define (definition-names-toplevel def)
 (match def
   (`(define ,name ,body) (list name))
   (`(dont-define ,body) '())
   (else (error 'definition-names-toplevel "malformed toplevel definition" def))))

